package com.demo.principle.singleResponsibility;

public class SingleResponsibility3 {

    public static void main(String[] args) {
        vehicle2 vehicle2 = new vehicle2();
        vehicle2.runRoad("Bicycle");
        vehicle2.runAir("Airplane");
        vehicle2.runWater("ship");
    }
}

// 交通工具
class vehicle2 {
    public void runRoad(String vehicle) {
        System.out.println(vehicle + " runRoad RUNNING");
    }

    public void runAir(String vehicle) {
        System.out.println(vehicle + " runAir RUNNING");
    }

    public void runWater(String vehicle) {
        System.out.println(vehicle + " runWater RUNNING");
    }
}
